package com.example.user.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.model.user.pojo.UserDO;
import com.example.user.mapper.UserMapper;
import com.example.user.rpc.facade.UserFacade;
import com.example.user.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户 业务逻辑层 具体实现
 *
 * @author Lv
 * @date 2023/10/02
 */
@Slf4j
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, UserDO> implements UserService {

    @Autowired
    private UserMapper userMapper;

    /**
     * 测试用户接口RPC调用
     *
     * @return
     */
    @Override
    public String testUserRpc() {
        return "user Rpc invoke success";
    }

    @Autowired
    private UserFacade userFacade;

    /**
     * 测试order服务RPC调用
     *
     * @return
     */
    @Override
    public String testOrderRpc() {
        return userFacade.testOrderRpc();
    }
}
